<form class="form-horizontal" role="form" id="deviceForm">
    <input type="hidden" name="id">
    <div class="form-group">
        <label  class="col-xs-3 control-label">mac地址</label>
        <div class="col-sm-9" style="position: relative;">
            <input type="text" class="form-control" name="mac" updateonlyread/>
        </div>
    </div>
    <div class="form-group">
        <label  class="col-xs-3 control-label">设备状态</label>
        <div class="col-sm-9">
            <select type="search" class="form-control status" name="status" updateonlyread></select>
        </div>
    </div>
    <div class="form-group">
        <label  class="col-xs-3 control-label">推送类别</label>
        <div class="col-sm-9">
            <select type="search" class="form-control pushType" name="pushType"></select>
        </div>
    </div>
    <div class="form-group matchText">
        <label  class="col-xs-3 control-label">匹配文字</label>
        <div class="col-sm-9">
            <input type="text" class="form-control" name="matchText" />
        </div>
    </div>
    <div class="form-group">
        <label  class="col-xs-3 control-label">开始工作时间</label>
        <div class="col-sm-9">
            <input  type="time" placeholder="开始工作时间" name="startTime"  class='form-control'>
        </div>
    </div>
    <div class="form-group">
        <label  class="col-xs-3 control-label">结束工作时间</label>
        <div class="col-sm-9">
            <input  type="time" placeholder="结束工作时间" name="endTime"  class='form-control'>
        </div>
    </div>
</form>
<script>
    $(function () {
        loadSelectByClassSync("/device/status",null,"status","设备在线状态","code","status");
        loadSelectByClassSync("/device/pushType",null,"pushType",null,"code","type");
        $(".pushType").change(function () {
            if($(this).val()==1)$(".matchText").show();
            else $(".matchText").hide();
        })
    })
</script>